﻿<Window x:Class="WaveTech.Scutex.Manager.Windows.GenerationWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:extToolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
        xmlns:UserControls="clr-namespace:WaveTech.Scutex.Manager.UserControls"
        x:Name="generationWindow"
        Title="Generate License Keys"
        Width="500"
        Height="500"
        WindowStartupLocation="CenterOwner">
	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="/DataTemplates.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="215" />
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
		</Grid.ColumnDefinitions>

		<GroupBox Grid.Row="0"
		          Grid.Column="0"
		          Margin="4,4,4,4"
		          Foreground="Black"
		          Header="License Settings">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*" />
					<ColumnDefinition Width="150" />
				</Grid.ColumnDefinitions>

				<TabControl Grid.Row="0" Grid.Column="0">
					<TabControl.Resources>
						<Style TargetType="{x:Type TabPanel}">
							<Setter Property="HorizontalAlignment" Value="Left" />
							<Setter Property="VerticalAlignment" Value="Top" />
						</Style>
					</TabControl.Resources>
					<TabItem Header="License Key Types">
						<Grid>
							<Grid.RowDefinitions>
								<RowDefinition Height="65" />
								<RowDefinition />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition />
							</Grid.ColumnDefinitions>

							<GroupBox Grid.Row="0"
							          Grid.Column="0"
							          Margin="2,2,2,2"
							          Header="License Set">
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition Height="30" />
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
										<ColumnDefinition />
									</Grid.ColumnDefinitions>

									<ComboBox x:Name="cboLicenseSet"
									          Width="250"
									          Margin="4,4,4,4"
									          DisplayMemberPath="Name"
									          ItemsSource="{Binding Source={StaticResource licenseSetData}}"
									          SelectionChanged="cboLicenseSet_SelectionChanged" />
								</Grid>
							</GroupBox>

							<GroupBox Grid.Row="1"
							          Grid.Column="0"
							          Margin="2,2,2,2"
							          Header="Key Type">
								<WrapPanel>
									<RadioButton x:Name="cboSingleUser"
									             Margin="4,4,4,4"
									             Content="Single User" />
									<RadioButton x:Name="cboMultiUser"
									             Margin="4,4,4,4"
									             Content="Multi User" />
									<RadioButton x:Name="cboHardwareLock"
									             Margin="4,4,4,4"
									             Content="Hardware Lock" />
									<RadioButton x:Name="cboHardwareLockLocal"
									             Margin="4,4,4,4"
									             Checked="cboHardwareLockLocal_Checked"
									             Content="Hardware Key"
									             Unchecked="cboHardwareLockLocal_Unchecked" />
									<RadioButton x:Name="cboUnlimited"
									             Margin="4,4,4,4"
									             Content="Unlimied" />
									<RadioButton x:Name="cboEnterprise"
									             Margin="4,4,4,4"
									             Content="Enteprise" />
								</WrapPanel>
							</GroupBox>
						</Grid>
					</TabItem>
					<TabItem Header="License Key Data">
						<TabItem.Resources>
							<Style TargetType="{x:Type TabPanel}">
								<Setter Property="HorizontalAlignment" Value="Left" />
								<Setter Property="VerticalAlignment" Value="Top" />
							</Style>
						</TabItem.Resources>
						<Grid>
							<Grid.RowDefinitions>
								<RowDefinition Height="85" />
								<RowDefinition />
							</Grid.RowDefinitions>
							<Grid.ColumnDefinitions>
								<ColumnDefinition />
							</Grid.ColumnDefinitions>

							<GroupBox Grid.Row="0"
							          Grid.Column="0"
							          Margin="2,2,2,2"
							          Header="Hardware Key Data">
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition Height="25" />
										<RowDefinition Height="25" />
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
										<ColumnDefinition />
									</Grid.ColumnDefinitions>

									<TextBlock Grid.Row="0"
									           Width="250"
									           VerticalAlignment="Bottom"
									           Foreground="Black"
									           Text="Hardware Fingerprint:" />
									<TextBox x:Name="txtHardwareKeyData"
									         Grid.Row="1"
									         Width="250"
									         Height="25" />
								</Grid>


							</GroupBox>


						</Grid>
					</TabItem>
				</TabControl>

				<Grid Grid.Row="0" Grid.Column="1">
					<Grid.RowDefinitions>
						<RowDefinition />
						<RowDefinition Height="25" />
						<RowDefinition Height="30" />
						<RowDefinition />
						<RowDefinition Height="35" />
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition />
					</Grid.ColumnDefinitions>

					<TextBlock Grid.Row="1"
					           HorizontalAlignment="Center"
					           VerticalAlignment="Center"
					           Foreground="Black"
					           Text="Keys to Generate:" />
					<extToolkit:IntegerUpDown x:Name="txtKeysToGenerate"
					                          Grid.Row="2"
					                          Margin="4,4,4,4" />

					<!--  <Ribbon:ButtonTool Grid.Row="4" x:Name="btnGenerateKeys" Content="Generate Keys" Margin="4,4,4,4" HorizontalAlignment="Right" Click="btnGenerateKeys_Click" />  -->
					<Button x:Name="btnGenerateKeys"
					        Grid.Row="4"
					        Margin="4,4,4,4"
					        HorizontalAlignment="Right"
					        Click="btnGenerateKeys_Click"
					        Content="Generate Keys" />
				</Grid>
			</Grid>


		</GroupBox>

		<GroupBox Grid.Row="1"
		          Grid.Column="0"
		          Margin="2,2,2,2"
		          Foreground="White"
		          Header="License Keys">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition />
					<RowDefinition Height="32" />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition />
					<ColumnDefinition />
				</Grid.ColumnDefinitions>

				<ListBox x:Name="lstLicenseKeys"
				         Grid.Row="0"
				         Grid.Column="0"
				         Grid.ColumnSpan="2"
				         ItemsSource="{Binding License.TrialNotificationType,
				                               ElementName=trialSettingsControl,
				                               Mode=TwoWay}" />

				<!--  <Ribbon:ButtonTool Grid.Row="1" Grid.Column="1" x:Name="btnSaveAndExport" Margin="4,4,4,4" Content="Save and Export Keys" HorizontalAlignment="Right" Click="btnSaveAndExport_Click"  />  -->
				<Button x:Name="btnSaveAndExport"
				        Grid.Row="1"
				        Grid.Column="1"
				        Margin="4,4,4,4"
				        HorizontalAlignment="Right"
				        Click="btnSaveAndExport_Click"
				        Content="Save and Export Keys" />
			</Grid>
		</GroupBox>

		<UserControls:LoadingAnimation x:Name="loadingAnimation"
		                               Grid.Row="0"
		                               Grid.RowSpan="2"
		                               Visibility="Collapsed"
		                               WindowHeight="{Binding ElementName=CurrentPresenter,
		                                                      Path=ActualHeight}"
		                               WindowWidth="{Binding ElementName=CurrentPresenter,
		                                                     Path=ActualWidth}" />
	</Grid>
</Window>
